import { defHttp } from "@/utils/http";

// ERP 药房信息 API
export const pharmacyApi = {
	// 获得药房信息分页
	pharmacyList: async (params: any) => {
		return await defHttp.get({ url: `/whs/pharmacy/page`, params });
	},
	// 新增药房信息
	pharmacyCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/pharmacy/create`, data });
	},

	// 修改药房信息
	pharmacyUpdate: async (data: any) => {
		return await defHttp.put({ url: `/whs/pharmacy/update`, data });
	},

	// 删除药房信息
	pharmacyDelete: async (id: number) => {
		return await defHttp.delete({ url: `/whs/pharmacy/delete?id=` + id });
	}
};
